<%@page import="youleche.com.model.MVehicleImageInfo"%>
<%@page import="java.util.List"%>
<%@page import="youleche.com.controler.controler.PageDataForBussinessControler"%>
<%@page import="youleche.com.model.MVehicleInfo"%>
<%@ page language="java" contentType="text/html;charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/WEB-INF/header.jsp" %>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<% 
        		MVehicleInfo vehicleInfo = (MVehicleInfo) request.getAttribute("vehicle");
        		if(vehicleInfo == null){
        			request.getRequestDispatcher("404.jsp").forward(request, response);
        			return;
        		}
        		
        		String isCanFQ = "不可分期";
        		if(vehicleInfo.getA4() != "0"){
        			isCanFQ = "可以分期(" + vehicleInfo.getA4() + "期)";
        		}
        		
        		List<MVehicleImageInfo> imgList= PageDataForBussinessControler.getImageInfoByVehicleId(vehicleInfo.getVehicleId());
        		if(imgList == null || imgList.size() == 0){
        			imgList = PageDataForBussinessControler.getInitImage();
        		}
        	%>
 <title><%= vehicleInfo.getA6() %>-美乐车网（www.meileche.com）</title>
 
<link href="${ctx}/image/meileche.jpg" rel="shortcut icon"/>
<link rel="stylesheet" href="${ctx}/css/home.css" media="screen" />
<link rel="stylesheet" href="${ctx}/FlexSlider/flexslider.css" media="screen" />
 <style type="text/css">

 .small_time
 {
     float: left;
     padding-left: 20px;
     margin-right: 10px;
     background: url(image/main_title_bg.png?v=2012614) no-repeat;
     background-position: 0 0;
 }
 .small_people_num
 {
     float: left;
     padding-left: 20px;
     margin-right: 10px;
     background: url(image/main_title_bg.png?v=2012614) no-repeat;
     background-position: 0 -36px;
 }
 .flexslider{
 width: 200px;
 height: 200px;
 }
 
 .slides li img {
 	height: 200px;
 }
    </style>
<script type="text/javascript" src="${ctx}/js/common/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${ctx}/js/common/jquery.cookie.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=nKLKhHpjMauRWU84zsIprGYj"></script>
<script type="text/javascript" src="${ctx}/FlexSlider/jquery.flexslider-min.js"></script>
<script type="text/javascript" src="${ctx}/js/detail.js"></script>
</head>
<body>
        <%@include file="top.jsp" %>
        <%@include file="nav.jsp" %>
        <div style="margin-left:auto;margin-right:auto;width:1000px;margin-top:20px;border-bottom:1px #444 dashed;padding-bottom:10px;">
        <img src="${ctx}/image/daohang.jpg" style="width:20px;height:20px;vertical-align: bottom;"/>
		<a href="http://www.meileche.com" style="color:#444;">美乐车网</a>
		->
		<a href="http://www.meileche.com/home.jsp" style="color:#444;">车辆报价</a>
		->
		<a href="http://www.meileche.com/che.do?id=<%=vehicleInfo.getVehicleId()%>&action=1" style="color:#444;">车辆报价详细信息</a>
		->
		<%= vehicleInfo.getVehicleName() %>(<%= vehicleInfo.getA1() %>)
	
        </div>
        <div style="margin-left: auto;margin-right:auto;width:1000px;">
        	<input type="hidden" id="hidA4" value="<%= vehicleInfo.getA4()%>"/>
            <div style="width:1000px;margin-top:10px;">
                <div style="float:left;width:920px;font-size:20px;height:30px;line-height: 40px;color:#444;">【<%= vehicleInfo.getVehicleName() %>(<%= vehicleInfo.getA1() %>)】</div>
                <div style="float:left;width:80px;font-size:20px;height:30px;line-height: 40px;color:#444;"></div>
                <div style="float:left;width:960px;font-size:20px;height:auto;line-height: 40px;color:#666;padding: 0px 20px 0px 50px;"><%= vehicleInfo.getA6() %> </div>
             <div style="float:left;width:1000px;font-size:10px;height:15px;line-height: 20px;color:#666;">
                <div class="small_time"><%= vehicleInfo.getAddTime() %></div>
                <div class="small_people_num"><%= vehicleInfo.getA3() == null ? "0" : vehicleInfo.getA3() %></div>
             </div>
                <div style="float: left; width: 1000px; height: 500px;">
                    <div style="width: 240px; height: 310px; border:1px solid #ccc;float: left; margin-top: 20px;">
                        <div style="width: 200px; height: 200px; float: left; margin: 20px 20px 20px 20px;">
                        	<div class="flexslider">
						<ul class="slides"> 
						   <%
							for(MVehicleImageInfo img : imgList){
								if("3".equals(img.getImageType())){		
							%>
									<li> <img src="vehicleImage/<%=img.getImagePath() %>" style="border:0px;width:200px;height:200px;"/></li>
								<%}
							}
						%>
						</ul>
					</div>
                        
                        </div>
                        
                    </div>
                    <div style="float:left;width:758px;">
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">报价</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                        <span style="color:#e22;font-size: 18px;"><%= vehicleInfo.getPrice() %> </span>元&nbsp;&nbsp;&nbsp; <span><%= isCanFQ %></span>
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">电池</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                            <span><%= vehicleInfo.getBatterySize()%>V</span>&nbsp;<span><%= vehicleInfo.getElectricitySize() %>AH</span>
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">行程</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                            <span><%= vehicleInfo.getWorkLength() %></span>km<span>(充一次电)</span>
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:72px;padding: 10px 10px 10px 5px;">出厂时间</div>
                        <div style="float:left;color: #444;font-size:18px;width:621px;padding: 10px;">
                            <span style="margin: 0px 0px 0px 12px;"></span><span><%= vehicleInfo.getCreateTime() %></span>&nbsp;&nbsp;&nbsp; 
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">区域</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                            <span><%= vehicleInfo.getA5() %></span> 
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">地址</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                            <span id="txtAddr"><%= vehicleInfo.getA2() %></span> （<a href="javascript:void(0);" onclick="javascript:document.getElementsByTagName('BODY')[0].scrollTop=document.getElementsByTagName('BODY')[0].scrollHeight;" style="cursor:pointer;">交通地图</a>）
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:60px;padding: 10px 10px 10px 30px;">联系人</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;">
                            <%= vehicleInfo.getLinkMan() %>
                        </div>
                        <div style="float:left;color: #444;font-size:18px;width:50px;padding: 10px 10px 10px 40px;">电话</div>
                        <div style="float:left;color: #444;font-size:18px;width:638px;padding: 10px;"> <img src="che.do?action=3&callNum=<%= vehicleInfo.getLinkPhoneNum() %>"/></div>
                        <div style="float:left;width:690px;font-size:20px;font-weight:bold;padding-top:10px;padding-left:10px;">
                        	联系我时，请说是在美乐车网上看到的，谢谢！
                        </div>
                    </div>
                    <div style="width: 1000px; float: left;">
                        <div style="width: 1000px; float: left;">
                            <div style="width: 120px; text-align:center;float: left; height: 50px; line-height: 60px; vertical-align: middle;
                                font-size: 24px; background-color: #72b088; color: #fff;border-radius:5px;">
                                车辆描述</div>
                        </div>
                        <div style="width: 1000px;float:left;" >
                            <div style="color: #444;font-size: 18px;line-height: 60px;">
		                          	  赠送配置：
		                          <% if(!"".equals(vehicleInfo.getA7()) && vehicleInfo.getA7() != null && !vehicleInfo.getA7().equals("6")){
		                        	  %>
		                        	  	<%
		                        	  		String zengsong = "";
		                        	  		if(vehicleInfo.getA7().contains("0")){
		                        	  			zengsong += "<img src=\"image/suo_icon.jpg\" alt=\"雨衣\"/>雨衣&nbsp;&nbsp;&nbsp;&nbsp;";
		                        	  		}
		                        	  		
		                        	  		if(vehicleInfo.getA7().contains("1")){
		                        	  			zengsong += "<img src=\"image/yuyi_icon.jpg\" alt=\"锁\"/>锁&nbsp;&nbsp;&nbsp;&nbsp;";
		                        	  		}

											if(vehicleInfo.getA7().contains("2")){
		                        	  			zengsong += "<img src=\"image/cdq_icon.jpg\" alt=\"充电器\"/>充电器&nbsp;&nbsp;&nbsp;&nbsp;";
		                        	  		}
											 if(vehicleInfo.getA7().contains("3")){
		                        	  			zengsong += "<img src=\"image/toukui_icon.jpg\" alt=\"头盔\"/>头盔&nbsp;&nbsp;&nbsp;&nbsp;";
		                        	  		}
											if(vehicleInfo.getA7().contains("4")){
		                        	  			zengsong += "<img src=\"image/zuotao_icon.jpg\" alt=\"座套\"/>座套&nbsp;&nbsp;&nbsp;&nbsp;";
		                        	  		}
		                        	  	%>
		                        	  	  <%= zengsong %>
		                        	  <%
		                          }else{
		                        	  %>
		                        	  	亲美美，商家太吝啬了，没有可赠送的物件~~~
		                        	  <%
		                          } %>
		                        
		                       </div>
                        </div>
                        
                        <div style="width: 1000px;float:left;" >
                            <div style="color: #444;font-size: 18px;min-height:100px;line-height: 60px;width:800px;float:left;">
                            <h4>车辆说明：</h4> 
								<div>
								<%
								String desc = vehicleInfo.getVehicleDesc().replace("\\n", "<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
								
								%>
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= desc%>
								</div>
                            </div>
                            <div style="width:200px;float:left;min-height:200px;">
                            	<%@include file="qy/html/recommend.jsp" %>
                            </div>
                        </div>
                        <div style="width: 1000px;float:left;" >
                            <div style="color: #444;font-size: 18px;float:left;width:1000px;line-height: 40px;">
                            车辆相关图片：
                            </div>
                            <div style="color: #444;font-size: 18px;float:left;width:1000px;">
                            	<%
                            		for(MVehicleImageInfo img : imgList){
                            			if("3".equals(img.getImageType())){
                            				%>
                            				<img style="max-width:1000px;" src="vehicleImage/<%= img.getImagePath()%>"/><br/><br/>
                            				<%
                            			}
                            		}
                            	%>
                            </div>
                        </div>
                        <div style="width: 1000px;float:left;margin-bottom: 60px;" >
                            <div style="color: #444;font-size: 18px;float:left;width:1000px;line-height: 40px;">
                            <h4>交通地图：</h4>
                            </div>
                            <div id="baidu_map" style="color: #444;font-size: 18px;float:left;width:1000px;border: 1px #ccc solid;height:400px;">
                            
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    
</body>
</html>
